//
//  WeekAxisValueFormatter.swift
//  MYModule
//
//  Created by 李然 on 2022/9/14.
//

import UIKit
import Charts

public class WeekAxisValueFormatter: NSObject, IAxisValueFormatter{
    
    public func stringForValue(_ value: Double, axis: AxisBase?) -> String {
        
       
        let index = Int(Int(value) % self.axisValueArray.count)
        
        return self.axisValueArray[index]
    }
    
   public var axisValueArray:[String] {
        let array = ["unit_week_full_1".language,
                     "unit_week_full_2".language,
                     "unit_week_full_3".language,
                     "unit_week_full_4".language,
                     "unit_week_full_5".language,
                     "unit_week_full_6".language,
                     "unit_week_full_7".language]
        return array
    }
}
